package com.yanqu.road.server.cmd.activity.peakseacraft;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.PeakSeacraftProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.manager.activity.peakseacraft.PeakSeacraftMgr;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = CrossProtocol.C_PEAK_SEACRAFT_GET_GROUP_UNION_LINST, desc = "海上争霸 分组内船只")
public class CrossPeakSeacraftGetGroupUnionListCmd extends CrossUnionCommand {


    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {

        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        PeakSeacraftProto.PeakSeacraftGetGroupUnionListGameToCrossMsg reqMsg = PeakSeacraftProto.PeakSeacraftGetGroupUnionListGameToCrossMsg.parseFrom(packet.getBytes());

        YanQuMessage pbMsg = YanQuMessageUtils.buildMessage(ClientProtocol.U_PEAK_SEACRAFT_GET_GROUP_UNION_LINST,
                PeakSeacraftMgr.getAreaGroupShipList(reqMsg.getActivityId(), reqMsg.getUnionId(), packet.getPlayerId(), reqMsg.getCtsMsg()));
        MessageHelper.sendPacket(serverId, packet.getPlayerId(), pbMsg);
    }

    @Override
    public void sendData() {

    }
}
